﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Baocaothongtinsanpham.ascx.cs" Inherits="WebUserControl_Baocaothongtinsanpham" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<script type="text/javascript">
     function pageLoad() {
       $("#<%= Button1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
       $("#<%= Button2.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff'
        }
    });
    setTimeout($.unblockUI, 7000); 
        }); 
       
       
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />
   <fieldset>
    <legend>Báo cáo thông tin sản phẩm</legend>
    </fieldset>  
    <div>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                Text="Báo cáo" />
            <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
                Text="Export to Excel" />
    </div>
 <br />
            <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server">
                <Fields>
                    <dxwpg:PivotGridField ID="field" Area="RowArea" AreaIndex="0" 
                        Caption="Ngành hàng" FieldName="nganhhang">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field1" Area="RowArea" AreaIndex="1" 
                        Caption="Nhãn hiệu" FieldName="nhanhieu">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field2" Area="RowArea" AreaIndex="2" 
                        Caption="Mã hàng" FieldName="mahang">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field3" Area="RowArea" AreaIndex="3" 
                        Caption="Tên hàng" FieldName="tenhang">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field4" Area="RowArea" AreaIndex="4" 
                        Caption="Quy cách" FieldName="quicach">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field5" Area="RowArea" AreaIndex="5" 
                        Caption="Giá bán" FieldName="giaban">
                    </dxwpg:PivotGridField>
                </Fields>
                <OptionsView ShowColumnGrandTotals="False" />
            </dxwpg:ASPxPivotGrid>
      
<uc1:uscMsgBox ID="uscMsgBox1" runat="server" />
<dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" runat="server" 
    ASPxPivotGridID="ASPxPivotGrid1">
</dxpgw:ASPxPivotGridExporter>

